<template>
  <div>
    <h1>Parent</h1>
    <p @click='myClick'>{{ count }}</p>
    <Child @changeCount='changeCount' />
    <Child @click='click1' />
    <Child @click.native='click1' />
  </div>
</template>

<script>
import Child from "./Child";
export default {
  name: "Parent",
  components: {
    Child,
  },
  data() {
    return {
      count: 0,
    };
  },
  methods:{
    myClick($event){
      this.count++
      console.log($event);
    },
    changeCount($event){
      this.count += $event
    },
    click1(){
      console.log('111');
    }
  }
};
</script>

<style>
</style>